#include <stdint.h>
#include "dataIO.h"
#include "ringBuffer.h"

void timer0SoftSerialReceiver_init(uint32_t baudRate);

class SoftSerialReceiver : public DataInput {
public:
	static const uint8_t WAITSTART = 0;
	static const uint8_t DATA0 = 1;
	static const uint8_t DATA7 = 8;
	static const uint8_t STOPBIT = 9;

	SoftSerialReceiver(uint32_t baudRate);
	char read();
	void clear();
	size_t available();
};
